package com.gx.spring.event.springevent;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication
@RestController
@EnableAsync
public class SpringEventApplication {

	public static void main(String[] args) {
//		SpringApplication application = new SpringApplication();

		SpringApplication.run(SpringEventApplication.class, args);
	}

	@Autowired
	UserService userService;

	@RequestMapping("/register")
	public String register(){
		userService.register("kirito");
		return "success";
	}

}
